﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="register.aspx.cs" Inherits="WebAccess.register" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
    Register your account</h2>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" 
    ValidationGroup="registergroup" />
<p>
    Username&nbsp;
    <asp:TextBox ID="TextBox1" runat="server" CausesValidation="True" 
        ValidationGroup="registergroup"></asp:TextBox>
    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
        ControlToValidate="TextBox1" ErrorMessage="Username should be an Email Address" 
        ForeColor="Red" 
        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
        ValidationGroup="registergroup"></asp:RegularExpressionValidator>
</p>
<p>
    Password&nbsp;
    <asp:TextBox ID="TextBox5" runat="server" CausesValidation="True" 
        TextMode="Password" ValidationGroup="registergroup"></asp:TextBox>
</p>
<p>
    Confirm Password&nbsp;
    <asp:TextBox ID="TextBox6" runat="server" CausesValidation="True" 
        ontextchanged="TextBox6_TextChanged" TextMode="Password" 
        ValidationGroup="registergroup"></asp:TextBox>
    <asp:CompareValidator ID="CompareValidator1" runat="server" 
        ControlToCompare="TextBox5" ControlToValidate="TextBox6" 
        ErrorMessage="Passwords do not match" ValidationGroup="registergroup"></asp:CompareValidator>
</p>
<p>
    &nbsp;</p>
<p>
    First Name&nbsp;
    <asp:TextBox ID="TextBox2" runat="server" ValidationGroup="registergroup"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
        ControlToValidate="TextBox2" ErrorMessage="First Name is Required" 
        ForeColor="Red" ValidationGroup="registergroup"></asp:RequiredFieldValidator>
</p>
<p>
    Last Name&nbsp;
    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
        ControlToValidate="TextBox3" ErrorMessage="Last name is required" 
        ForeColor="Red" ValidationGroup="registergroup"></asp:RequiredFieldValidator>
</p>
<p>
    Nickname&nbsp;
    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
        ControlToValidate="TextBox4" ErrorMessage="Please enter a nickname" 
        ForeColor="Red" ValidationGroup="registergroup"></asp:RequiredFieldValidator>
</p>
<p>
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Submit" />
</p>
</asp:Content>
